package com.spring.housing.returnType;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.Iterator;
import java.util.Set;

@Data
public class CommenResult<T> {
    private Integer status;
    private String message;
    private T data;
public CommenResult(Integer status, String message,T data)
    {
   this.status=status;
   this.message=message;
   this.data=data;
}
    public CommenResult() {
    }
    public Integer getStatus() {
        return status;
    }
    public void setStatus(Integer status) {
        this.status = status;
    }
    public String getMessage() {
        return message;
    }
    public void setMessage(String message) {
        this.message = message;
    }
    public Object getData() {
        return data;
    }
    public void setData(T data) {
        this.data = data;
    }
    @Override
    public String toString() {
        StringBuffer stringBuffer = new StringBuffer();
        stringBuffer.append("状态值:"+this.getStatus()+" 信息:"+this.getMessage()+"返回的数据: "+this.getData());
        return stringBuffer.toString();
    }
}
